package com.nexus.all.dto;

import com.nexus.bean.annotation.valid.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @ClassName: CommentDTO
 * @Author: ZZYR
 * @Date: 2024/2/26  9:21
 * @Version 1.0.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel("评论对象入参")
public class CommentDTO {

    @ApiModelProperty(value = "评论内容", required = true)
    @NotBlank(message = "评论内容不能为空", groups = AddGroup.class)
    private String commentContent;

    @ApiModelProperty(value = "评论类型（1.笔记评论，2.商家评论）", required = true)
    @NotNull(message = "评论类型不能为空", groups = AddGroup.class)
    private Byte commentType;


    @ApiModelProperty(value = "笔记id/商家id", required = true)
    @NotNull(message = "笔记id/商家id不能为空", groups = AddGroup.class)
    private Long commentDataId;

    @ApiModelProperty(value = "评论配图（可多张，分号“；”分割，最多6张")
    private String commentImgs;

    @ApiModelProperty(value = "用户id", hidden = true)
    private Long userId;

    @ApiModelProperty(value = "评论ip地址", hidden = true)
    private String createAddress;

    @ApiModelProperty(value = "父级评论id")
    private Long parentId;

}
